package com.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.dao.UserDao;
import com.model.CFUser;

@Service("userService")
@Transactional
public class UserServiceImpl implements UserService {

	@Autowired
	private UserDao userDao;
	
	@Autowired
	public UserServiceImpl(UserDao userDao) {
		this.userDao = userDao;
	}

	@Override
	public void addUser(CFUser user) {
		userDao.addUser(user);

	}

	@Override
	public void saveUser(CFUser user) {
		userDao.saveUser(user);

	}

	@Override
	public CFUser findUserByUserName(String username) {
		return userDao.findUserByUserName(username);
	
	}

	@Override
	public void deleteUser(String username) {
		userDao.deleteUser(username);

	}

	@Override
	public boolean isUsernameAvailable(String username) {
		// TODO Auto-generated method stub
		return false;
	}

}
